<html>
<head>
<link href="../enzo.css" rel="stylesheet" type="text/css">
   <title>AMR user's guide: compilation</title>
</head>

<h1>
AMR user's guide: compilation</h1>

<h2>Requirements</h2>

    <ul>
      <li>About 50 MB of free disk space.</li>
      <li>The <a href="http://hdf.ncsa.uiuc.edu/">HDF libraries</a>.  Assuming you don't want to
	use <a href="http://hdf.ncsa.uiuc.edu/hdf4.html">HDF4</a>, you should only need the 
	<A href="http://hdf.ncsa.uiuc.edu/HDF5/">HDF5 library</a></li>
      <li>Fortran 77 and C++ compilers.</li>
      <li>The <a href="http://www-unix.mcs.anl.gov/mpi/index.html">MPI library</a>.</li>
    </ul>



    <h2>Compiling</h2>

<p>For instructions on the basic make options, go to the top-level enzo directory and type:</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>gmake help</tt></p>

<p>
The compilation process is fairly straightforward.  Enzo is already pre-configured to
compile on most NCSA, SDSC and PSC machines.  While in the top-level directory, type:
</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>./configure</tt></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>gmake</tt></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>gmake install</tt></p>

<p>
All portions of the code should automatically compile and executables should
be placed in the enzo-code/bin directory.  If you are compiling on non-NCSA machine you may have
to add extra makefiles in the config directory to get the code to compile correctly.
See the README in enzo-code/config for more information.  If you are using a machine
type/architecture that isn't explicitly supported the process of compilation could 
become extremely complicated.</p>

<p>The general philosophy of enzo is that all options are specified in the
parameter file at run-time, so that once the code is compiled it does not need
to be recompiled to run another problem or change a parameter.  There are some
compiler-time parameters, which can be seen by typing:</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>gmake help-config</tt></p>

<p>This allows the user to specify the specific machine, the
desired precision of the code, the version of HDF, and various timing 
and optimization settings.  The code is parallelized using MPI, so 
compiler-based parallelization is NOT recommended.</p>


<h2>Subdirectories</h2>
    <p>
      There are several subdirectories in the enzo-code directories.  They are:
</p>
<p>
    <table border=1>
    <tr>
      <th>directory</th>
      <th>description</th>
    </tr>
    <tr>
      <th>bin</th>
      <th>binary directory</th>
    </tr>

    <tr>
      <th>ring</th>
      <th>contains the Ring particle IO parallelization tool</th>
    </tr>
    <tr>
      <th>hdf5_tools</th>
      <th> contains 
      various tools that may be useful for the HDF 5 version of enzo</th>
    </tr>
    <tr>
      <th>amr_mpi</th>
      <th>the directory containing source for the enzo code and analysis tools</th>
    </tr>
    <tr>
      <th>enzo_jobs</th>
      <th>example batch files</th>
    </tr>

    <tr>
      <th>uniglue</th>
      <th>tool for putting Enzo HDF 5 datasets together into single monolithic files</th>
    </tr>
    <tr>
      <th>inits</th>
      <th>cosmological initial conditions generator</th>
    </tr>
    <tr>
      <th>config</th>
      <th>Files for configuring enzo</th>
    </tr>
    <tr>
      <th>enzo_tests</th>
      <th>test files and sample parameter files</th>
    </tr>

  </table>
</p>


<hr WIDTH="100%">
<center>last modified 01 July 2003<br>
by <a href="mailto:bwoshea (AT) lanl.gov">B.W. O'Shea</a></center>

</body>
</html>
